package com.demo;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

public class ArrayListTest {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList();
        list.add(1);
        list.add(3);
        list.add(9);
        list.add(7);
        list.add(6);
        for (Integer integer : list) {
            System.out.print(integer+",");
        }
        System.out.println("=============");
        Collections.sort(list);
        for (Integer integer : list) {
            System.out.print(integer+",");
        }
    }
}
